﻿using OpenNETCF.Barcode;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using System;
using System.Drawing.Imaging;

namespace OpenNETCF.Barcode.Unit.Test
{
    /// <summary>
    ///This is a test class for GraphicToolsTest and is intended
    ///to contain all GraphicToolsTest Unit Tests
    ///</summary>
    [TestClass()]
    public class GraphicToolsTest
    {
        public TestContext TestContext { get; set; }

        /// <summary>
        ///A test for BitsPerPixel
        ///</summary>
        [TestMethod()]
        public void BitsPerPixelTest()
        {
            Assert.AreEqual<int>(1, PixelFormat.Format1bppIndexed.BitsPerPixel());

            Assert.AreEqual<int>(4, PixelFormat.Format4bppIndexed.BitsPerPixel());

            Assert.AreEqual<int>(8, PixelFormat.Format8bppIndexed.BitsPerPixel());

            Assert.AreEqual<int>(16, PixelFormat.Format16bppArgb1555.BitsPerPixel());
            Assert.AreEqual<int>(16, PixelFormat.Format16bppGrayScale.BitsPerPixel());
            Assert.AreEqual<int>(16, PixelFormat.Format16bppRgb555.BitsPerPixel());
            Assert.AreEqual<int>(16, PixelFormat.Format16bppRgb565.BitsPerPixel());

            Assert.AreEqual<int>(24, PixelFormat.Format24bppRgb.BitsPerPixel());

            Assert.AreEqual<int>(32, PixelFormat.Format32bppArgb.BitsPerPixel());
            Assert.AreEqual<int>(32, PixelFormat.Format32bppPArgb.BitsPerPixel());
            Assert.AreEqual<int>(32, PixelFormat.Format32bppRgb.BitsPerPixel());

            Assert.AreEqual<int>(48, PixelFormat.Format48bppRgb.BitsPerPixel());
        }
    }
}
